home *** CD-ROM | disk | FTP | other *** search
Wrap
ffffoooorrrrkkkk((((2222)))) ffffoooorrrrkkkk((((2222)))) NNNNAAAAMMMMEEEE _ffff_oooo_rrrr_kkkk, _vvvv_ffff_oooo_rrrr_kkkk - create a new process CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>> _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_uuuu_nnnn_iiii_ssss_tttt_dddd_...._hhhh_>>>> ppppiiiidddd____tttt ffffoooorrrrkkkk ((((vvvvooooiiiidddd))));;;; _####_iiii_ffff ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE _&&&&_&&&& ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE______EEEE_XXXX_TTTT_EEEE_NNNN_DDDD_EEEE_DDDD_====_====_1111 ppppiiiidddd____tttt vvvvffffoooorrrrkkkk ((((vvvvooooiiiidddd))));;;; _####_eeee_nnnn_dddd_iiii_ffff Only when in the X/Open XPG4 Extended Unix name space are _vvvv_ffff_oooo_rrrr_kkkk and _ffff_oooo_rrrr_kkkk exactly the same in this system and any reference to _ffff_oooo_rrrr_kkkk in this document also applies to _vvvv_ffff_oooo_rrrr_kkkk. It should also be noted that this _vvvv_ffff_oooo_rrrr_kkkk is _NNNN_OOOO_TTTT and _DDDD_OOOO_EEEE_SSSS _NNNN_OOOO_TTTT have the same semantics as the original BSD _vvvv_ffff_oooo_rrrr_kkkk. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _ffff_oooo_rrrr_kkkk causes creation of a new process. The new process (child process) is an exact copy of the calling process (parent process). This means the child process inherits the following attributes from the parent process: real user ID, real group ID, effective user ID, effective group ID environment close-on-exec flag [see _eeee_xxxx_eeee_cccc(2)] signal handling settings (i.e., _SSSS_IIII_GGGG______DDDD_FFFF_LLLL, _SSSS_IIII_GGGG______IIII_GGGG_NNNN, _SSSS_IIII_GGGG______HHHH_OOOO_LLLL_DDDD, function address) supplementary group IDs set-user-ID mode bit set-group-ID mode bit profiling on/off/mode status [see _ssss_pppp_rrrr_oooo_ffff_iiii_llll(2)] debugger tracing status [see _pppp_rrrr_oooo_cccc(4)] nice value [see _nnnn_iiii_cccc_eeee(2)] scheduler class [see _pppp_rrrr_oooo_cccc(4) and _ssss_cccc_hhhh_eeee_dddd_cccc_tttt_llll(2)] all attached shared memory segments [see _ssss_hhhh_mmmm_oooo_pppp(2)] all mapped files [see _mmmm_mmmm_aaaa_pppp(2)] non-degrading priority [see _ssss_cccc_hhhh_eeee_dddd_cccc_tttt_llll(2)] process group ID session ID [see _eeee_xxxx_iiii_tttt(2)] current working directory root directory file mode creation mask [see _uuuu_mmmm_aaaa_ssss_kkkk(2)] resource limits [see _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt(2)] controlling terminal all machine register state including floating point control register(s) The child process differs from the parent process in the following ways: PPPPaaaaggggeeee 1111 ffffoooorrrrkkkk((((2222)))) ffffoooorrrrkkkk((((2222)))) The child process has a unique process ID which does not match any active process group ID. The child process has a different parent process ID (i.e., the process ID of the parent process). The child process has its own copy of the parent's file descriptors and directory streams. Each of the child's file descriptors shares a common file pointer with the corresponding file descriptor of the parent. File locks previously set by the parent are not inherited by the child [see _ffff_cccc_nnnn_tttt_llll(2)]. All semadj values are cleared [see _ssss_eeee_mmmm_oooo_pppp(2)]. Process locks, text locks and data locks are not inherited by the child [see _pppp_llll_oooo_cccc_kkkk(2)]. The set of signals pending to the parent is not inherited by the child. Page locks are not inherited [see _mmmm_pppp_iiii_nnnn(2)]. The child process's _u_t_i_m_e, _s_t_i_m_e, _c_u_t_i_m_e, and _c_s_t_i_m_e are set to 0. The time left until an alarm clock signal is reset to 0. The time left until an itimer signal is reset to 0. The child will not inherit the ability to make graphics calls. The child process may receive a segmentation fault upon attempting to make a graphics call, unless it initializes itself as a graphics process via _wwww_iiii_nnnn_oooo_pppp_eeee_nnnn() or _gggg_iiii_nnnn_iiii_tttt(). _N_O_T_E: Currently, if the parent is a graphics process, the child's attempt to become a graphics process will fail. The share mask is set to 0 [see _ssss_pppp_rrrr_oooo_cccc(2)]. If a _ffff_oooo_rrrr_kkkk is performed by a process that is part of a share group [see _ssss_pppp_rrrr_oooo_cccc(2)]) then the new child process will automatically be added to the parallel C library I/O arena. This can result in additional ways that _ffff_oooo_rrrr_kkkk can fail. _ffff_oooo_rrrr_kkkk will fail and no child process will be created if one or more of the following are true: [EAGAIN] The system-imposed limit on the total number of processes under execution, {_N_P_R_O_C} [see _iiii_nnnn_tttt_rrrr_oooo(2)], would be exceeded. PPPPaaaaggggeeee 2222 ffffoooorrrrkkkk((((2222)))) ffffoooorrrrkkkk((((2222)))) [EAGAIN] The system-imposed limit on the total number of processes under execution by a single user {_C_H_I_L_D__M_A_X} [see _iiii_nnnn_tttt_rrrr_oooo(2)], would be exceeded. [EAGAIN] Amount of system memory required is temporarily unavailable. When the caller is a member of a share group in addition to the above errors _ffff_oooo_rrrr_kkkk will fail and no new process will be created if one or more of the following are true: [ENOSPC] If the total number of share group members plus children exceeds the maximum number of users specified via _uuuu_ssss_cccc_oooo_nnnn_ffff_iiii_gggg(3P) (8 by default). Any changes via _uuuu_ssss_cccc_oooo_nnnn_ffff_iiii_gggg(3P) must be done BEFORE the first _ssss_pppp_rrrr_oooo_cccc is performed. [ENOLCK] There are not enough file locks in the system. _N_e_w _p_r_o_c_e_s_s _p_i_d # _c_o_u_l_d _n_o_t _j_o_i_n _I/_O _a_r_e_n_a:<..> if the new process could not properly join the parallel C library I/O arena. The new process in this case exits with a -1. SSSSEEEEEEEE AAAALLLLSSSSOOOO exec(2), intro(2), mmap(2), nice(2), plock(2), ptrace(2), schedctl(2), semop(2), shmop(2), signal(2), sigset(2), sigaction(2), schedctl(2), sproc(2), sprofil(2), times(2), ulimit(2), umask(2), wait(2), pcreate(3C), signal(3B), sigvec(3B), usinit(3P), usconfig(3P), proc(4). DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS Upon successful completion, _ffff_oooo_rrrr_kkkk returns a value of _0000 to the child process and returns the process ID of the child process to the parent process. Otherwise, a value of (_p_i_d__t)-_1 is returned to the parent process, no child process is created, and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error. PPPPaaaaggggeeee 3333